<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>摸鱼助手</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f8f9fa;
            color: #333;
            padding: 20px;
            min-height: 100vh;
        }

        .container {
            max-width: 100%;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            overflow: hidden;
        }

        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            text-align: center;
        }

        .header h1 {
            font-size: 24px;
            margin-bottom: 8px;
        }

        .header .subtitle {
            opacity: 0.9;
            font-size: 14px;
        }

        .content {
            padding: 20px;
        }

        .status-section {
            margin-bottom: 25px;
        }

        .status-card {
            background: #f8f9fa;
            border-left: 4px solid #667eea;
            padding: 15px;
            border-radius: 4px;
            margin-bottom: 15px;
        }

        .status-indicator {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }

        .status-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin-right: 8px;
        }

        .status-dot.active {
            background-color: #28a745;
            box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
        }

        .status-dot.inactive {
            background-color: #6c757d;
        }

        .toggle-button {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 15px;
        }

        .toggle-button.activate {
            background: linear-gradient(135deg, #28a745, #20c997);
            color: white;
        }

        .toggle-button.deactivate {
            background: linear-gradient(135deg, #dc3545, #fd7e14);
            color: white;
        }

        .toggle-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .progress-section {
            margin-bottom: 25px;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background-color: #e9ecef;
            border-radius: 4px;
            overflow: hidden;
            margin: 10px 0;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2);
            transition: width 0.3s ease;
        }

        .progress-text {
            font-size: 12px;
            color: #6c757d;
            margin-top: 5px;
        }

        .novel-section {
            margin-bottom: 25px;
        }

        .novel-info {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 15px;
        }

        .novel-title {
            font-weight: 600;
            margin-bottom: 5px;
        }

        .novel-stats {
            font-size: 12px;
            color: #6c757d;
        }

        .file-input-wrapper {
            position: relative;
            display: inline-block;
            width: 100%;
            margin-bottom: 10px;
        }

        .file-input {
            display: none;
        }

        .file-input-label {
            display: block;
            padding: 10px 15px;
            background: #667eea;
            color: white;
            border-radius: 6px;
            cursor: pointer;
            text-align: center;
            transition: background-color 0.3s ease;
        }

        .file-input-label:hover {
            background: #5a67d8;
        }

        .controls {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }

        .control-button {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #dee2e6;
            background: white;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.2s ease;
        }

        .control-button:hover {
            background: #f8f9fa;
            border-color: #667eea;
        }

        .shortcut-info {
            background: #e3f2fd;
            border: 1px solid #bbdefb;
            padding: 10px;
            border-radius: 4px;
            font-size: 12px;
            text-align: center;
            color: #1565c0;
        }

        .section-title {
            font-weight: 600;
            margin-bottom: 15px;
            color: #495057;
            display: flex;
            align-items: center;
        }

        .section-title::before {
            content: '';
            width: 4px;
            height: 16px;
            background: #667eea;
            border-radius: 2px;
            margin-right: 8px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>🐠 摸鱼助手</h1>
            <div class="subtitle">让工作更有趣</div>
        </div>

        <div class="content">
            <!-- 状态区域 -->
            <div class="status-section">
                <h3 class="section-title">当前状态</h3>
                <div class="status-card">
                    <div class="status-indicator">
                        <div class="status-dot inactive" id="statusDot"></div>
                        <span id="statusText">正常模式</span>
                    </div>
                    <button class="toggle-button activate" id="toggleButton">
                        启用摸鱼模式
                    </button>
                    <div class="shortcut-info">
                        快捷键: <strong>Ctrl + Shift + F</strong>
                    </div>
                </div>
            </div>

            <!-- 进度区域 -->
            <div class="progress-section">
                <h3 class="section-title">阅读进度</h3>
                <div class="progress-bar">
                    <div class="progress-fill" id="progressFill" style="width: 0%"></div>
                </div>
                <div class="progress-text" id="progressText">
                    已读: 0 / 0 字符 (0.0%)
                </div>
            </div>

            <!-- 小说管理 -->
            <div class="novel-section">
                <h3 class="section-title">小说管理</h3>
                <div class="novel-info" id="novelInfo">
                    <div class="novel-title" id="novelTitle">未加载小说</div>
                    <div class="novel-stats" id="novelStats">请导入小说文件</div>
                </div>

                <div class="file-input-wrapper">
                    <input type="file" class="file-input" id="fileInput" accept=".txt">
                    <label for="fileInput" class="file-input-label">
                        📁 导入小说文件 (.txt)
                    </label>
                </div>

                <div class="controls">
                    <button class="control-button" id="resetProgress">重置进度</button>
                    <button class="control-button" id="clearStorage">清除数据</button>
                </div>
            </div>
        </div>
    </div>

    <!-- Office.js 库 -->
    <script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
    <script src="taskpane.js"></script>
</body>
</html>